<template>
  <el-container style="width: 100%; text-align: center">
    <img :src="content" style="margin: 0 auto" />
  </el-container>
</template>

<script>
  export default {
    name: 'ImageView',
    data: function() {
      return {
        content: null,
      }
    },
    props: {
      id: {
        type: String,
        default: '1236543722627973121',
      },
      version: null,
      applyId: String,
    },
    created() {
      this.getImageData(this.id, this.version, this.applyId);
    },
    methods: {
      getImageData(id, version, applyId) {
        this.$api.getFileData(id, version, applyId).then(data => {
          this.content = data;
        })
      }
    }
  }
</script>

<style scoped>

</style>
